<template>
  <h2>当前求和为：{{sum}}</h2>
  <button @click="sum++">点我+1</button>
  <hr>
  <h2>当前点击的坐标为:x:{{point.x}},y:{{point.y}}</h2>
</template>

<script>
    import {onBeforeUnmount, onMounted, reactive, ref} from 'vue'
    import usePonit from '../hooks/usePoint'
    export default {
        name: "Demo",
        setup(){
            let sum = ref(666)
            let point = usePonit()


            //返回一个对象
            return {
                sum,
                point
            }
        },
    }
</script>